package com.example.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.system.dto.RoleDto;
import com.example.system.entity.Role;
import com.example.system.vo.RoleVo;

import java.util.List;

/**
 *
 * @author 王令
 * @since 2022-08-05
 */
public interface IRoleService extends IService<Role> {

    void create(RoleDto roleDto);

    void update(RoleDto roleDto);

    /**
     * @since v0.0.3
     */
    void grantAuthorities(Long roleId, List<Long> authoritiesId);

    List<Role> listByUserId(Long userId);

    List<Role> listByUsername(String username);

    List<RoleVo> listAll();

    List<Long> listAuthorityIdByRoleId(Long roleId);

}
